<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <title>管理后台 - 专业挖掘机培训系统</title>
    <link href="static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
    <link href="https://cdn.jsdelivr.net/npm/aos@2.3.4/dist/aos.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
    <style>
         :root {
            --primary-color: #1890ff;
            --success-color: #52c41a;
            --warning-color: #faad14;
            --danger-color: #ff4d4f;
            --text-color: #333333;
            --border-radius: 4px;
            --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
            background: #f0f2f5;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            color: var(--text-color);
            line-height: 1.5;
        }
        
        .nav {
            background: #fff;
            box-shadow: var(--box-shadow);
            padding: 0 24px;
            position: sticky;
            top: 0;
            z-index: 1000;
            display: flex;
            justify-content: space-between;
            align-items: center;
            height: 64px;
        }
        
        .logo {
            color: var(--primary-color);
            font-size: 18px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .logo i {
            font-size: 24px;
        }
        
        .nav-links {
            display: flex;
            gap: 8px;
        }
        
        .nav-links a {
            color: var(--text-color);
            text-decoration: none;
            padding: 8px 16px;
            border-radius: var(--border-radius);
            transition: all 0.3s;
        }
        
        .nav-links a:hover {
            color: var(--primary-color);
            background: rgba(24, 144, 255, 0.1);
        }
        
        .nav-links a.active {
            color: var(--primary-color);
            background: rgba(24, 144, 255, 0.1);
            font-weight: 500;
        }
        
        .page-container {
            flex: 1;
            padding: 24px;
            max-width: 1200px;
            margin: 0 auto;
            width: 100%;
        }
        
        .dashboard {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
            margin-bottom: 24px;
        }
        
        .stat-card {
            background: #fff;
            padding: 24px;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            transition: all 0.3s;
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        
        .stat-card .icon {
            font-size: 32px;
            margin-bottom: 16px;
            color: var(--primary-color);
        }
        
        .stat-card .title {
            font-size: 16px;
            color: rgba(0, 0, 0, 0.65);
            margin-bottom: 8px;
        }
        
        .stat-card .number {
            font-size: 24px;
            font-weight: 600;
            color: var(--text-color);
        }
        
        .quick-actions {
            background: #fff;
            padding: 24px;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            margin-bottom: 24px;
        }
        
        .quick-actions h2 {
            font-size: 18px;
            margin-bottom: 16px;
            color: rgba(0, 0, 0, 0.85);
        }
        
        .action-buttons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
        }
        
        .action-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 24px;
            background: #fafafa;
            border-radius: var(--border-radius);
            text-decoration: none;
            color: var(--text-color);
            transition: all 0.3s;
            cursor: pointer;
        }
        
        .action-btn:hover {
            background: #f0f0f0;
            transform: translateY(-2px);
        }
        
        .action-btn i {
            font-size: 24px;
            margin-bottom: 8px;
            color: var(--primary-color);
        }
        
        .footer {
            background: #fff;
            padding: 24px;
            text-align: center;
            color: rgba(0, 0, 0, 0.45);
            box-shadow: 0 -1px 0 0 #f0f0f0;
        }
        
        .footer p {
            margin: 0;
            line-height: 1.5;
        }
        
        @media (max-width: 768px) {
            .dashboard {
                grid-template-columns: 1fr;
            }
            .action-buttons {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>

<body>
    <nav class="nav">
        <div class="logo">
            <i class="fas fa-truck-monster"></i> 专业挖掘机培训
        </div>
        <div class="nav-links">
            <a href="adminindex.html" class="active">
                <i class="fas fa-home"></i> 首页
            </a>
            <a href="member.html">
                <i class="fas fa-users"></i> 学员管理
            </a>
            <a href="score.html">
                <i class="fas fa-graduation-cap"></i> 成绩管理
            </a>
            <a href="subject.html">
                <i class="fas fa-tasks"></i> 考试管理
            </a>
            <a href="/logout">
                <i class="fas fa-sign-out-alt"></i> 退出登录
            </a>
        </div>
    </nav>

    <div class="page-container">
        <div class="dashboard">
            <div class="stat-card">
                <i class="fas fa-users icon"></i>
                <div class="title">在培学员</div>
                <div class="number">128</div>
            </div>
            <div class="stat-card">
                <i class="fas fa-graduation-cap icon"></i>
                <div class="title">考试通过率</div>
                <div class="number">95%</div>
            </div>
            <div class="stat-card">
                <i class="fas fa-calendar-check icon"></i>
                <div class="title">今日考试</div>
                <div class="number">12</div>
            </div>
        </div>

        <div class="quick-actions">
            <h2>快捷操作</h2>
            <div class="action-buttons">
                <div class="action-btn" onclick="openAddMember()">
                    <i class="fas fa-user-plus"></i>
                    <span>添加学员</span>
                </div>
                <div class="action-btn" onclick="openAddScore()">
                    <i class="fas fa-edit"></i>
                    <span>录入成绩</span>
                </div>
                <div class="action-btn" onclick="openAddSubject()">
                    <i class="fas fa-calendar-plus"></i>
                    <span>安排考试</span>
                </div>
            </div>
        </div>
    </div>

    <footer class="footer">
        <p>©2024 专业挖掘机培训系统 版权所有</p>
        <p>地址：郑州市新郑市龙湖镇教育园区 | 联系电话：400-888-8888</p>
    </footer>

    <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
    <script>
        // 获取统计数据
        $(document).ready(function() {
            $.ajax({
                url: '/api/dashboard/stats',
                method: 'GET',
                success: function(res) {
                    if (res.code === 0) {
                        // 更新统计数据
                        // 这里添加更新统计卡片数据的逻辑
                    }
                }
            });
        });

        // 打开添加学员窗口
        function openAddMember() {
            const width = 500;
            const height = 600;
            const left = (window.screen.width - width) / 2;
            const top = (window.screen.height - height) / 2;

            window.open('member-add.html', 'addMember',
                `width=${width},
                 height=${height},
                 left=${left},
                 top=${top},
                 toolbar=no,
                 menubar=no,
                 scrollbars=yes,
                 resizable=no,
                 location=no,
                 status=no`
            );
        }

        // 打开录入成绩窗口
        function openAddScore() {
            const width = 500;
            const height = 600;
            const left = (window.screen.width - width) / 2;
            const top = (window.screen.height - height) / 2;

            window.open('score-add.html', 'addScore',
                `width=${width},
                 height=${height},
                 left=${left},
                 top=${top},
                 toolbar=no,
                 menubar=no,
                 scrollbars=yes,
                 resizable=no,
                 location=no,
                 status=no`
            );
        }

        // 打开安排考试窗口
        function openAddSubject() {
            const width = 500;
            const height = 700;
            const left = (window.screen.width - width) / 2;
            const top = (window.screen.height - height) / 2;

            window.open('subject-add.html', 'addSubject',
                `width=${width},
                 height=${height},
                 left=${left},
                 top=${top},
                 toolbar=no,
                 menubar=no,
                 scrollbars=yes,
                 resizable=no,
                 location=no,
                 status=no`
            );
        }
    </script>
</body>

</html>